package response

import "time"

type SysLoginUser struct {
	Id               int       `json:"id,string"`
	Account          string    `json:"account"`
	NickName         string    `json:"nickName"`
	Name             string    `json:"name"`
	Avatar           *int      `json:"avatar,string"`
	Birthday         time.Time `json:"birthday"`
	Sex              *int8     `json:"sex"`
	Email            string    `json:"email"`
	Phone            string    `json:"phone"`
	Tel              string    `json:"tel"`
	AdminType        int8      `json:"adminType"`
	LastLoginIp      string    `json:"lastLoginIp"`
	LastLoginTime    string    `json:"lastLoginTime"`
	LastLoginAddress *string   `json:"lastLoginAddress"`
	LastLoginBrowser *string   `json:"lastLoginBrowser"`
	LastLoginOs      *string   `json:"lastLoginOs"`
	//员工信息
	LoginEmpInfo LoginEmpInfo `json:"loginEmpInfo"`
	//具备应用信息
	Apps []map[string]interface{} `json:"apps"`
	//角色信息
	Roles []map[string]interface{} `json:"roles"`
	//权限信息
	Permissions []string `json:"permissions"`
	//登录菜单信息，AntDesign版本菜单
	Menus []*LoginMenuTreeNode `json:"menus"`
	//数据范围信息
	DataScopes []int `json:"dataScopes"`

	Authorities           []*GunsAuthority `json:"authorities"`
	Username              string           `json:"username"`
	AccountNonExpired     bool             `json:"accountNoneExpired"`
	AccountNonLocked      bool             `json:"accountNonLocked"`
	CredentialsNonExpired bool             `json:"credentialsNonExpired"`
	Enabled               bool             `json:"enabled"`
	Password              string           `json:"-"`
}

type LoginEmpInfo struct {
	JobNum    *string                  `json:"jobNum"`
	OrgId     *int                     `json:"orgId,string"`
	OrgName   *string                  `json:"orgName"`
	ExtOrgPos []map[string]interface{} `json:"extOrgPos"`
	Positions []map[string]interface{} `json:"positions"`
}

type LoginMenuTreeNode struct {
	Id        int     `json:"id,string"`
	Pid       int     `json:"pid,string"`
	Name      string  `json:"name"`
	Component string  `json:"component"`
	Redirect  *string `json:"redirect"`
	Meta      *Meta   `json:"meta"`
	Path      *string `json:"path"`
	Hidden    bool    `json:"hidden"`
}

type Meta struct {
	Title  *string `json:"title"`
	Icon   *string `json:"icon"`
	Show   *bool   `json:"show"`
	Target *string `json:"target"`
	Link   *string `json:"link"`
}

type GunsAuthority struct {
	Authority string `json:"authority"`
}
